<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            margin: 0px;padding: 0px;
        }
        .search{
            margin: 10px;
            font-size: 14px;
        }
        input{
            width: 260px;
            height: 32px;
            border-radius: 10px;
            border: none;
            background-color: #f5f5f5;
            padding: 0 10px;
            outline: none;
            margin-right: 10px;
        }
        .seaList{
            margin: 10px;
        }
        .seaList>h3{
            margin: 20px 0px;
        }
        .seaList>span{
            padding: 4px 10px;
            border-radius: 4px;
            display: inline-block;
            background-color: #f5f5f5;
            margin: 10px 0px;
            margin-right: 10px;
            font-size: 14px;
        }
    </style>
</head>
<body>
    <div id="app">
        <div class="search">
            <!-- 
                v-model 表单数据绑定，也是唯一一个具有双向数据绑定特点的指令
                v-model 指令主要配合表单元素使用
             -->
            <input type="text" placeholder="输入店铺、商品名称" v-model="seaText">
            <span @click="search">搜索</span>
        </div>
        <div class="seaList">
            <h3>历史记录</h3>
            <span v-for="(item,index) in seaArr"> {{item}} </span>
        </div>
    </div>
</body>
</html>
<script src="./vue-2.5.21.js"></script>
<script src="./04_indexSearch.js"></script>